Repository navigation
fix(pm-stack): preserve DO fan-out on ingest failure and deduplicate by eventId (#9612) - #9624
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 seconds. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
# Conflicts: # pm-stack/decision-events-worker/test/events.test.ts
Fixes #9612 (Codex P1 from PR #9341).
Changes
/ingestdeduplication (pm-stack/decision-events-worker/src/index.ts): tracks seeneventIds in DO storage (capped at the most recent 1000) so duplicate deliveries do not incrementfannedOutor re-broadcast to WebSocket subscribers.handlePostEventsretry safety: fans out all valid events in the batch (not justmeta.changes > 0) and returns HTTP502if any Durable Object/ingestcall fails or throws, so the sync client does not acknowledge the batch and retries safely.pm-stack/decision-events-worker/test/events.test.ts): verifies D1 commit + DO/ingest500 returns 502, retry delivers the event once (fannedOut: 1), and a second retry deduplicates (deduplicated: 1).Verification
bun testinpm-stack/decision-events-worker: 8 pass, 0 fail (34 assertions).Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.